package com.heima.media.feign;

import com.heima.common.dto.ResponseResult;
import com.heima.media.entity.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-media")
public interface MediaFeign {

    /**
     * tips:提供给其他微服务调用Feign接口 业务参数泛型必须要指定
     * 保存自媒体用户
     *
     * @param wmUser
     * @return
     */
    @PostMapping("/api/v1/user")
    public ResponseResult<WmUser> saveWmUser(@RequestBody WmUser wmUser);


    /**
     * 更新自媒体用户
     *
     * @param wmUser
     * @return
     */
    @PutMapping("/api/v1/user")
    public void updateWmUser(@RequestBody WmUser wmUser);


}
